$border_color: lightgray;
body, div, main, nav, ul, li {
    padding: 0; margin: 0;
}
body{
    display: flex;
    margin: 0;
    padding: 0;
    height: 90vh;
}
nav{
    border: 1px solid $border_color;
    padding: 1em;
    .buttons{
        float: right;
        padding: 1em 0;
        .icon-add{
            margin-right: 0.8em;
            display: block;
        }
    }
    .list{
        clear: both;
        li{
            margin: 5px 0;
            display:  flex;
            list-style: none;
            &.active{
                border: 1px solid $border_color;
            }
            a.title{
                height: 32px; 
                line-height: 32px;
                width: 160px;
                text-overflow: ellipsis;
                overflow: hidden;
            }
            .btn-delete{
                margin: 0 1em;
            }
        }
    }
}
// 主体内容自适应
main{
    flex: 1;
}

.editor, .preview-container{
    width: 50%;
    height: 100%;
    box-sizing: border-box;
    float: left;
    padding: 1em;
    border: 1px dashed $border_color;
}

.editor{
    display: flex;
    flex-direction: column;
    .title{
        width: 100%;
        display: flex;
        input{
            font-size: 16px;
            padding: 1em 2em;
            flex: 1;
        }
    }
    .md-editor{
        flex: 1;
        margin-top: 1em;
        display: flex;
        textarea{
            font-size: 16px;
            flex: 1;
            line-height: 1.5em;
            padding: 1em 2em;
            border: 1px solid $border_color;
        }
    }
}
.preview-container{
    display: flex;
    padding-bottom: 0;
    flex-direction: column;
    .preview{
        padding: 0 1em;
        flex: 1;
        border: 1px solid $border_color;
        overflow: auto;
        line-height: 1.5em;
    }
    .buttons{
        padding: 1em 0;
        .btn-save{
            float: right;
            padding: 1em 2em;
            border-radius: 0.5em;
            background: lightgreen;
            border:none;
            cursor: pointer;
        }
    }
}

